package com.java.framework;

import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

;

public class TestGson {
	public static void main(String[] args) {
		String json = "[{\"name\":\"name0\",\"age\":0},{\"name\":\"name1\",\"age\":5},{\"name\":\"name2\",\"age\":10},{\"name\":\"name3\",\"age\":15},{\"name\":\"name4\",\"age\":20},{\"name\":\"name5\",\"age\":25},{\"name\":\"name6\",\"age\":30},{\"name\":\"name7\",\"age\":35},{\"name\":\"name8\",\"age\":40},{\"name\":\"name9\",\"age\":45}]";
		Gson gson = new Gson();
		Type type = new TypeToken<List<Map<String, Object>>>() {
		}.getType();
		List<Map<String, String>> list = gson.fromJson(json, type);
		System.out.println(list);
	}
}
